package com.xk.school_device.controller;

import com.xk.school_device.common.Result;
import com.xk.school_device.entity.Roles;
import com.xk.school_device.service.IRolesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author xk
 * @since 2025-04-16
 */
@RestController
@RequestMapping("/api/common/user")
public class RolesController {

    @Autowired
    private IRolesService rolesService;
    @PostMapping("/role")
    public Result getRoles() {
        List<Roles> list = rolesService.list();

        return Result.success(list);
    }
}
